package my.edu.model.bills.bound.entity.dto;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.groups.Default;
import lombok.Data;
import my.edu.common.validate.groups.Insert;

import java.math.BigDecimal;

@Data
public class AssemblyDetailDTO {
    private Long id;
    private Long assemblyOrderId;
    @NotNull(message = "商品id不能为空", groups = {Insert.class, Default.class})
    @Min(value = 1, message = "商品id必须大于0", groups = {Insert.class, Default.class})
    private Long productId;
    private String productName;
    private String unit;
    private String brand;
    private String productCategory;
    private String productAttributes;
    private Long warehouseId;
    private String warehouseName;
    private Integer availableStock;
    @NotNull(message = "数量不能为空", groups = {Insert.class, Default.class})
    @Min(value = 0, message = "数量必须大于0", groups = {Insert.class, Default.class})private Integer quantity;
    @Min(value = 0, message = "金额必须大于0", groups = {Insert.class, Default.class})
    private BigDecimal outboundUnitCost;
    @Min(value = 0, message = "金额必须大于0", groups = {Insert.class, Default.class})

    private BigDecimal outboundCost;
    private String productRemark;

}
